home *** CD-ROM | disk | FTP | other *** search
- 0 rem bowling - john fedor
- 10 ifpeek(49152)<>76thenfori=0to251:reada:poke49152+i,a:next
- 20 poke198,0:clr
- 30 dim n$(8),s(26,8),h(8),b(8)
- 40 poke53280,0:poke53281,0:sys49155
- 50 fori=54272to54296:pokei,0:next:poke54296,15:poke54273,15:poke54277,17
- 60 print"[147]bowling by john fedor"
- 70 print"how many players (1-8):";
- 80 geta$:ifa$<"1"ora$>"8"then80
- 90 printa$
- 100 np=val(a$)
- 110 fori=1tonp
- 120 print"[147]player #"i"[157]."
- 130 print:print"enter your name ";
- 140 inputn$(i)
- 150 n$(i)=left$(n$(i)+" ",20)
- 160 print"enter handicap (1-10, 1 hardest) ";:inputh(i)
- 170 ifh(i)<1orh(i)>10then160
- 180 nexti
- 190 poke53281,1:print"[147]":poke53281,0
- 200 print"players[154] [194] 1[194] 2[194] 3[194] 4[194] 5[194] 6[194] 7[194] 8[194] 9[194] 10[194]"
- 210 fori=1tonp
- 220 printleft$(n$(i),7)
- 230 nexti
- 240 forf=1to10:forp=1tonp
- 250 print""
- 260 fori=1to39:print"[195]";:nexti:print:print:print:print:print:print:print
- 270 print:print:print:fori=1to39:print"[195]";:nexti
- 280 rem set up pins now ((NULL))
- 290 print""
- 300 fory=1to7
- 310 z=-(y=3ory=5)-2*(y=2ory=6)-3*(y=1ory=7)
- 320 printtab(34+z)"[216] ";
- 330 ify>2andy<6thenprint"[216]";
- 340 print:nexty
- 350 b=1:rem which ball #
- 360 print"[158]player up:[159]"n$(p)""
- 370 gosub380:goto590
- 380 y=15:dy=1:poke198,0
- 390 b(p)=b(p)+1:d=0
- 400 poke828,y:poke829,dy:poke830,10+h(p)*12:sys49152
- 410 y=peek(828)
- 420 :
- 430 forx=1to33:poke1023+y*40+x,32:poke1024+y*40+x,81
- 440 fort7=1to2:nextt7,x
- 450 x=x-1
- 460 x=x+1
- 470 a1=1024+y*40+x
- 480 ifpeek(a1)=88then510
- 490 ifx=39thens(b(p),p)=d:return
- 500 pokea1-1,32:pokea1,81:goto460
- 510 ifpeek(a1)=88thenpokea1,32:d=d+1:poke54276,0:poke54276,129
- 520 ifpeek(a1-39)=88thenpokea1-39,32:d=d+1:poke54276,0:poke54276,129
- 530 ifpeek(a1+41)=88thenpokea1+41,32:d=d+1:poke54276,0:poke54276,129
- 540 ifpeek(a1+82)=88thenpokea1+82,32:d=d+1:poke54276,0:poke54276,129
- 550 ifpeek(a1-78)=88thenpokea1-78,32:d=d+1:poke54276,0:poke54276,129
- 560 ifpeek(a1-117)=88thenpokea1-117,32:d=d+1:poke54276,0:poke54276,129
- 570 ifpeek(a1+123)=88thenpokea1+123,32:d=d+1:poke54276,0:poke54276,129
- 580 goto490
- 590 rem ball end of alley
- 600 poke1023+x+y*40,32
- 610 poke55296+(p+2)*40+5+f*3+b,1
- 620 z=1024+(p+2)*40+5+f*3+b:ifd<10thenpokez,48+d
- 630 ifb=2andd<10thenpokez,48+d
- 640 ifb=1andd=10thenpokez,24
- 650 ifb=2andd+s(b(p)-1,p)=10thenpokez,78
- 660 ifb=1andd=10thenb(p)=b(p)+1:goto680
- 670 ifb=1thenb=2:goto370
- 680 iff<10then710
- 690 ifb=1thenbu=2:goto720
- 700 ifb=2theny=s(b(p),p)+s(b(p)-1,p):ify=10thenbu=1:goto720
- 710 nextp,f:goto870:rem scoring
- 720 rem bonus ball
- 730 print""
- 740 if s(19,p)=10 and s(21,p)<10ands(21,p)>0then800
- 750 fory=1to7
- 760 z=-(y=3ory=5)-2*(y=2ory=6)-3*(y=1ory=7)
- 770 printtab(34+z)"[216] ";
- 780 ify>2andy<6thenprint"[216]";
- 790 print:nexty
- 800 d=0:b=b+1:gosub380:bu=bu-1
- 810 poke1023+x+y*40,32:poke55296+(p+2)*40+5+f*3+b,1
- 820 z=1024+(p+2)*40+5+f*3+b
- 830 ifd=10thenpokez,24
- 840 ifd<10thenpokez,d+48
- 850 ifbuthen720
- 860 goto710
- 870 rem scoring routine
- 880 print""
- 890 fori=1to12:print" ":nexti
- 900 print""
- 910 forp=1tonp:printn$(p)tab(20);
- 920 sc=0:b(p)=0:forf=1to9
- 930 b(p)=b(p)+1:fb=s(b(p),p)
- 940 b(p)=b(p)+1:sb=s(b(p),p)
- 950 sc=sc+fb+sb:iffb+sb=10thensc=sc+s(b(p)+1,p)
- 960 iffb=10thensc=sc+s(b(p)+2,p):ifs(b(p)+1,p)=10thensc=sc+s(b(p)+3,p)
- 970 nextf:b(p)=b(p)+1
- 980 b1=s(b(p),p):b2=s(b(p)+1,p):b3=s(b(p)+2,p)
- 990 ifb1=10thenb2=b3:b3=s(b(p)+3,p)
- 1000 sc=sc+b1+b2+b3
- 1010 printsc:nextp
- 1020 rem end routine
- 1030 print"play again (y/n) ?"
- 1040 geta$:ifa$<>"y"anda$<>"n"then1040
- 1050 ifa$="y"thenrun
- 1060 print"[147]bye":end
- 1070 data76,107,192,169,8,32,210,255,173,14,220,41,254,141,14,220
- 1080 data165,1,41,251,133,1,162,0,189,0,208,157,0,48,189,0
- 1090 data209,157,0,49,189,0,210,157,0,50,189,0,211,157,0,51
- 1100 data189,0,212,157,0,52,189,0,213,157,0,53,189,0,214,157
- 1110 data0,54,189,0,215,157,0,55,232,208,205,32,234,192,41,240
- 1120 data9,12,141,24,208,162,0,189,99,192,157,192,50,232,224,8
- 1130 data208,245,96,0,24,24,24,60,126,126,60,169,0,133,251,133
- 1140 data252,162,0,24,165,251,109,60,3,133,251,165,252,105,0,133
- 1150 data252,232,224,40,208,237,24,165,252,105,4,133,252,160,0,169
- 1160 data32,145,251,174,60,3,172,61,3,192,1,208,14,202,56,165
- 1170 data251,233,40,133,251,165,252,233,0,133,252,192,2,208,14,232
- 1180 data24,165,251,105,40,133,251,165,252,105,0,133,252,142,60,3
- 1190 data224,13,240,4,224,21,208,8,173,61,3,73,3,141,61,3
- 1200 data169,81,160,0,145,251,174,62,3,160,0,136,208,253,202,208
- 1210 data248,32,228,255,208,3,76,141,192,96,165,1,9,4,133,1
- 1220 data173,14,220,9,1,141,14,220,173,24,208,96
-